{extend name="pub/base2" /}
{block name="title"}
<title>采集编辑</title>
{/block}

{block name="body"}
<article class="clearfix pd-20">
    <form action="{:url('edit')}" method="post" class="form form-horizontal" enctype="multipart/form-data">
        <input type="hidden" value="{$log.id}" name="id">
        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>小说名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$log.book_name}" readonly="readonly">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>源：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$log.src}" name="src">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>源地址：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$log.src_url}" name="src_url">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3">最新章节索引：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$log.last_chapter_order}"  name="last_chapter_order">
            </div>
        </div>

        <div class="row clearfix">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>最新章节：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$log.last_chapter}" name="last_chapter">
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>

{/block}
{block name="script"}
<script>
    $(function () {
        $("form").validate({
            rules: {
                book_name: {
                    required: true,
                    minlength: 1,
                    maxlength: 50
                },
                src: {
                    required: true
                },
                src_url: {
                    required: true
                },
                last_chapter: {
                    required: true
                }
            },
            onkeyup: false,
            focusCleanup: false,
            success:"valid"
        });
    });

</script>
{/block}